﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PrintPropertyNoPhoto.aspx.cs"
    Inherits="whatpricemyhouse.agent.PrintPropertyNoPhoto" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../css/main-style.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div class="propertyComparisonList">
        <asp:ListView ID="ListView1" runat="server" DataSourceID="SqlDataSource1" EnableModelValidation="True"
            DataKeyNames="propertyID">
            <AlternatingItemTemplate>
              <div class="propertyList">
                    <div class="leftHolder">
                        <div class="idNumber">
                            &nbsp;&nbsp; #<asp:Label ID="Label1" runat="server" Text='<%# Eval("no") %>' />
                        </div>
                        <div class="image">
                            &nbsp;
                        </div>
                    </div>
                    <div class="rightHolder">
                        <br />
                        <div class="lines">
                            <div class="line1">
                                <asp:Label ID="PlaceNameLabel" runat="server" Text='<%# Eval("suburb") %>' />
                            </div>
                            <div class="line2">
                                <asp:Label ID="streetNumLabel" runat="server" Text='<%# Eval("streetNum") %>' />
                                &nbsp;<asp:Label ID="addressLabel" runat="server" Text='<%# Eval("address") %>' />
                            </div>
                            <div class="line3">
                                <asp:Label ID="dateOfSaleLabel" runat="server" Text='<%# Eval("dateOfSale") %>' />
                                -
                                <asp:Label ID="priceLabel" runat="server" Text='<%# Eval("price") %>' />
                            </div>
                            <div class="line4">
                                <asp:Label ID="descriptionLabel" runat="server" Text='<%# Eval("description") %>' />
                            </div>
                        </div>
                    </div>
                </div>
            </AlternatingItemTemplate>
            <EditItemTemplate>
                <span style="background-color: #008A8C; color: #FFFFFF;">propertyID:
                    <asp:Label ID="propertyIDLabel1" runat="server" Text='<%# Eval("propertyID") %>' />
                    <br />
                    placeID:
                    <asp:TextBox ID="placeIDTextBox" runat="server" Text='<%# Bind("placeID") %>' />
                    <br />
                    otherLocation:
                    <asp:TextBox ID="otherLocationTextBox" runat="server" Text='<%# Bind("otherLocation") %>' />
                    <br />
                    streetNum:
                    <asp:TextBox ID="streetNumTextBox" runat="server" Text='<%# Bind("streetNum") %>' />
                    <br />
                    address:
                    <asp:TextBox ID="addressTextBox" runat="server" Text='<%# Bind("address") %>' />
                    <br />
                    status:
                    <asp:TextBox ID="statusTextBox" runat="server" Text='<%# Bind("status") %>' />
                    <br />
                    dateOfSale:
                    <asp:TextBox ID="dateOfSaleTextBox" runat="server" Text='<%# Bind("dateOfSale") %>' />
                    <br />
                    price:
                    <asp:TextBox ID="priceTextBox" runat="server" Text='<%# Bind("price") %>' />
                    <br />
                    description:
                    <asp:TextBox ID="descriptionTextBox" runat="server" Text='<%# Bind("description") %>' />
                    <br />
                    imageUrl:
                    <asp:TextBox ID="imageUrlTextBox" runat="server" Text='<%# Bind("imageUrl") %>' />
                    <br />
                    SSIID:
                    <asp:TextBox ID="SSIIDTextBox" runat="server" Text='<%# Bind("SSIID") %>' />
                    <br />
                    UserId:
                    <asp:TextBox ID="UserIdTextBox" runat="server" Text='<%# Bind("UserId") %>' />
                    <br />
                    createDate:
                    <asp:TextBox ID="createDateTextBox" runat="server" Text='<%# Bind("createDate") %>' />
                    <br />
                    <asp:CheckBox ID="isOldCheckBox" runat="server" Checked='<%# Bind("isOld") %>' Text="isOld" />
                    <br />
                    no:
                    <asp:Label ID="noLabel1" runat="server" Text='<%# Eval("no") %>' />
                    <br />
                    PlaceName:
                    <asp:TextBox ID="PlaceNameTextBox" runat="server" Text='<%# Bind("PlaceName") %>' />
                    <br />
                    <asp:Button ID="UpdateButton" runat="server" CommandName="Update" Text="Update" />
                    <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Cancel" />
                    <br />
                    <br />
                </span>
            </EditItemTemplate>
            <EmptyDataTemplate>
                <span>No data was returned.</span>
            </EmptyDataTemplate>
            <InsertItemTemplate>
                <span style="">propertyID:
                    <asp:TextBox ID="propertyIDTextBox" runat="server" Text='<%# Bind("propertyID") %>' />
                    <br />
                    placeID:
                    <asp:TextBox ID="placeIDTextBox" runat="server" Text='<%# Bind("placeID") %>' />
                    <br />
                    otherLocation:
                    <asp:TextBox ID="otherLocationTextBox" runat="server" Text='<%# Bind("otherLocation") %>' />
                    <br />
                    streetNum:
                    <asp:TextBox ID="streetNumTextBox" runat="server" Text='<%# Bind("streetNum") %>' />
                    <br />
                    address:
                    <asp:TextBox ID="addressTextBox" runat="server" Text='<%# Bind("address") %>' />
                    <br />
                    status:
                    <asp:TextBox ID="statusTextBox" runat="server" Text='<%# Bind("status") %>' />
                    <br />
                    dateOfSale:
                    <asp:TextBox ID="dateOfSaleTextBox" runat="server" Text='<%# Bind("dateOfSale") %>' />
                    <br />
                    price:
                    <asp:TextBox ID="priceTextBox" runat="server" Text='<%# Bind("price") %>' />
                    <br />
                    description:
                    <asp:TextBox ID="descriptionTextBox" runat="server" Text='<%# Bind("description") %>' />
                    <br />
                    imageUrl:
                    <asp:TextBox ID="imageUrlTextBox" runat="server" Text='<%# Bind("imageUrl") %>' />
                    <br />
                    SSIID:
                    <asp:TextBox ID="SSIIDTextBox" runat="server" Text='<%# Bind("SSIID") %>' />
                    <br />
                    UserId:
                    <asp:TextBox ID="UserIdTextBox" runat="server" Text='<%# Bind("UserId") %>' />
                    <br />
                    createDate:
                    <asp:TextBox ID="createDateTextBox" runat="server" Text='<%# Bind("createDate") %>' />
                    <br />
                    <asp:CheckBox ID="isOldCheckBox" runat="server" Checked='<%# Bind("isOld") %>' Text="isOld" />
                    <br />
                    PlaceName:
                    <asp:TextBox ID="PlaceNameTextBox" runat="server" Text='<%# Bind("PlaceName") %>' />
                    <br />
                    <asp:Button ID="InsertButton" runat="server" CommandName="Insert" Text="Insert" />
                    <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Clear" />
                    <br />
                    <br />
                </span>
            </InsertItemTemplate>
            <ItemTemplate>
              <div class="propertyList">
                    <div class="leftHolder">
                        <div class="idNumber">
                            &nbsp;&nbsp; #<asp:Label ID="Label1" runat="server" Text='<%# Eval("no") %>' />
                        </div>
                        <div class="image">
                            &nbsp;
                        </div>
                    </div>
                    <div class="rightHolder">
                        <br />
                        <div class="lines">
                            <div class="line1">
                                <asp:Label ID="PlaceNameLabel" runat="server" Text='<%# Eval("suburb") %>' />
                            </div>
                            <div class="line2">
                                <asp:Label ID="streetNumLabel" runat="server" Text='<%# Eval("streetNum") %>' />
                                &nbsp;<asp:Label ID="addressLabel" runat="server" Text='<%# Eval("address") %>' />
                            </div>
                            <div class="line3">
                                <asp:Label ID="dateOfSaleLabel" runat="server" Text='<%# Eval("dateOfSale") %>' />
                                -
                                <asp:Label ID="priceLabel" runat="server" Text='<%# Eval("price") %>' />
                            </div>
                            <div class="line4">
                                <asp:Label ID="descriptionLabel" runat="server" Text='<%# Eval("description") %>' />
                            </div>
                        </div>
                    </div>
                </div>
            </ItemTemplate>
            <LayoutTemplate>
                <div id="itemPlaceholderContainer" runat="server" style="font-family: Verdana, Arial, Helvetica, sans-serif;">
                    <span runat="server" id="itemPlaceholder" />
                </div>
                <div style="text-align: center; background-color: #CCCCCC; font-family: Verdana, Arial, Helvetica, sans-serif;
                    color: #000000;">
                </div>
            </LayoutTemplate>
            <SelectedItemTemplate>
                <span style="background-color: #008A8C; font-weight: bold; color: #FFFFFF;">propertyID:
                    <asp:Label ID="propertyIDLabel" runat="server" Text='<%# Eval("propertyID") %>' />
                    <br />
                    placeID:
                    <asp:Label ID="placeIDLabel" runat="server" Text='<%# Eval("placeID") %>' />
                    <br />
                    otherLocation:
                    <asp:Label ID="otherLocationLabel" runat="server" Text='<%# Eval("otherLocation") %>' />
                    <br />
                    streetNum:
                    <asp:Label ID="streetNumLabel" runat="server" Text='<%# Eval("streetNum") %>' />
                    <br />
                    address:
                    <asp:Label ID="addressLabel" runat="server" Text='<%# Eval("address") %>' />
                    <br />
                    status:
                    <asp:Label ID="statusLabel" runat="server" Text='<%# Eval("status") %>' />
                    <br />
                    dateOfSale:
                    <asp:Label ID="dateOfSaleLabel" runat="server" Text='<%# Eval("dateOfSale") %>' />
                    <br />
                    price:
                    <asp:Label ID="priceLabel" runat="server" Text='<%# Eval("price") %>' />
                    <br />
                    description:
                    <asp:Label ID="descriptionLabel" runat="server" Text='<%# Eval("description") %>' />
                    <br />
                    imageUrl:
                    <asp:Label ID="imageUrlLabel" runat="server" Text='<%# Eval("imageUrl") %>' />
                    <br />
                    SSIID:
                    <asp:Label ID="SSIIDLabel" runat="server" Text='<%# Eval("SSIID") %>' />
                    <br />
                    UserId:
                    <asp:Label ID="UserIdLabel" runat="server" Text='<%# Eval("UserId") %>' />
                    <br />
                    createDate:
                    <asp:Label ID="createDateLabel" runat="server" Text='<%# Eval("createDate") %>' />
                    <br />
                    <asp:CheckBox ID="isOldCheckBox" runat="server" Checked='<%# Eval("isOld") %>' Enabled="false"
                        Text="isOld" />
                    <br />
                    no:
                    <asp:Label ID="noLabel" runat="server" Text='<%# Eval("no") %>' />
                    <br />
                    PlaceName:
                    <asp:Label ID="PlaceNameLabel" runat="server" Text='<%# Eval("PlaceName") %>' />
                    <br />
                    <br />
                </span>
            </SelectedItemTemplate>
        </asp:ListView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:WhatPriceMyHouseConnectionString %>"
            SelectCommand="SELECT market_comparison_property_table.propertyID, market_comparison_property_table.otherLocation, market_comparison_property_table.streetNum, market_comparison_property_table.address, market_comparison_property_table.status, market_comparison_property_table.dateOfSale, market_comparison_property_table.price, market_comparison_property_table.description, market_comparison_property_table.imageUrl, market_comparison_property_table.SSIID, market_comparison_property_table.UserId, market_comparison_property_table.createDate, market_comparison_property_table.isOld, market_comparison_property_table.no, suburbs.suburb, suburbs.area FROM market_comparison_property_table INNER JOIN suburbs ON market_comparison_property_table.suburbid = suburbs.suburbid WHERE (suburbs.area LIKE @area) ORDER BY market_comparison_property_table.no DESC"
            ConflictDetection="CompareAllValues" DeleteCommand="DELETE FROM [market_comparison_property_table] WHERE [propertyID] = @original_propertyID"
            OldValuesParameterFormatString="original_{0}">
            <DeleteParameters>
                <asp:Parameter Name="original_propertyID" Type="String" />
            </DeleteParameters>
            <SelectParameters>
                <asp:SessionParameter DefaultValue="Auckland" Name="area" SessionField="areaName" />
            </SelectParameters>
        </asp:SqlDataSource>
    </div>
    </form>
    <script type="text/javascript" language="javascript">
        window.print();
    </script>
</body>
</html>
